package com.thesharegame.model;

import java.util.Collection;
import java.util.HashSet;
import java.util.Set;

public class Market {

	private String name;
	private String symbol;
	private Set<Stock> stocks;
	private long id;
	
	public Market(){
		id = -1;
		stocks = new HashSet<>();
	}
	
	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}
	
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public String getSymbol() {
		return symbol;
	}
	
	public void setSymbol(String symbol) {
		this.symbol = symbol;
	}
	
	public Set<Stock> getStocks() {
		return stocks;
	}
	
	public void setStocks(Set<Stock> stocks) {
		this.stocks = stocks;
	}
	
	public void addStock(Stock stock){
		this.stocks.add(stock);
	}
	
	public void addStocks(Collection<Stock> stocks){
		this.stocks.addAll(stocks);
	}
}
